<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>javascript 阶段</title>
    <style>
        body ,
        html {
            margin: 0;
            padding: 0;
        }

        .container {
            width: 300px;
            height: 300px;
            margin: 0 auto;
            /* background-color: blanchedalmond; */
            border-radius: 50%;
            /* border-color: rgb(150, 107, 44); */
            border: 2px solid blue;
            position: relative;
        }

        .shi {
            width: 10px;
            height: 60px;
            background-color: black;
            position: absolute;
            top: 88px;
            left: 148px;
            transform-origin: left bottom;
        }

        .fen {
            width: 5px;
            height: 80px;
            background-color: palegoldenrod;
            position: absolute;
            top: 65px;
            left: 150px;
            transform-origin: left bottom;
        }

        .miao {
            width: 3px;
            height: 100px;
            background-color: rgb(172, 90, 114);
            position: absolute;
            top: 50px;
            left: 150px;
            transform-origin: left bottom;
        }

        .center {
            position: absolute;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background-color: palegreen;
            left: 144px;
            top: 140px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="shi"></div>
        <div class="fen"></div>
        <div class="miao"></div>
        <div class="center"></div>
    </div>
    <script>
        var hours = document.querySelector(".shi");
        var min = document.querySelector(".fen");
        var sec = document.querySelector(".miao");

        var angle = 0 ;

        var time = setInterval(function () {
            angle +=6;
            sec.style["transform"] = "rotate("+angle +"deg)";
        } , 1000)

        var time_1 = setInterval(function () {
            angle +=6;
            min.style["transform"] = "rotate("+angle +"deg)";
        } , 1000*60)

        var time_2 = setInterval(function () {
            angle +=6;
            hours.style["transform"] = "rotate("+angle +"deg)";
        } , 1000*60*60)
    </script>
</body>
</html>